package clientView;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;

import javax.swing.Box;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.LineBorder;

import object.Company;
import clientUtilGUI.UtilityGUI;
import database.CompanyDelegate;

public class Contact_View extends JPanel {

	private JLabel lblCompanyType;
	private JLabel lblTTCongTy;
	private JComponent panel_3;
	private JComponent panel_7;
	private JLabel lblYahoo;
	private JComponent lblMail;
	private JComponent lblPhone1;
	private JLabel lblAddress1;
	private JLabel lblYaer;
	private JComponent lblSangLap;
	private JComponent lblLinhVuc;
	private JComponent lblLoaiHinh;
	private JComponent lblCongTy;
	private JComponent panel_6;
	private JComponent panel_5;
	private JLabel lblLienHe;
	private JComponent panel_4;
	private JPanel panel_2;
	private JPanel panel_1;
	private JComponent panel;
	private JLabel lblCompanyIn;
	private JLabel lblTTSangLap;
	private JLabel lblNamThanhLap;
	private JLabel lblNewLabel;
	private JLabel lblNewLabel_1;

	/**
	 * Create the panel.
	 */
	public Contact_View() {
		Company list = CompanyDelegate.getCompany1(1);
		setLayout(new BorderLayout(0, 0));
		
		panel = new JPanel();
		panel.setBorder(new LineBorder(Color.LIGHT_GRAY, 2));
		add(panel, BorderLayout.CENTER);
		panel.setLayout(new BorderLayout(0, 0));
		
		Box horizontalBox = Box.createHorizontalBox();
		panel.add(horizontalBox, BorderLayout.CENTER);
		
		panel_1 = new JPanel();
		panel_1.setBorder(new LineBorder(new Color(192, 192, 192), 0));
		panel_1.setPreferredSize(new Dimension(2, 1000));
		horizontalBox.add(panel_1);
		GridBagLayout gbl_panel_1 = new GridBagLayout();
		gbl_panel_1.columnWidths = new int[]{0};
		gbl_panel_1.rowHeights = new int[]{0};
		gbl_panel_1.columnWeights = new double[]{Double.MIN_VALUE};
		gbl_panel_1.rowWeights = new double[]{Double.MIN_VALUE};
		panel_1.setLayout(gbl_panel_1);
		
		panel_2 = new JPanel();
		panel_2.setPreferredSize(new Dimension(500, 20000));
		panel_2.setBorder(new LineBorder(Color.LIGHT_GRAY, 2));
		horizontalBox.add(panel_2);
		panel_2.setLayout(new BorderLayout(0, 0));
		
		Box verticalBox = Box.createVerticalBox();
		panel_2.add(verticalBox);
		
		panel_4 = new JPanel();
		panel_4.setPreferredSize(new Dimension(500, 500));
		verticalBox.add(panel_4);
		GridBagLayout gbl_panel_4 = new GridBagLayout();
		gbl_panel_4.columnWidths = new int[]{0, 0, 0, 0, 0, 0, 0};
		gbl_panel_4.rowHeights = new int[]{0, 0};
		gbl_panel_4.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE};
		gbl_panel_4.rowWeights = new double[]{0.0, Double.MIN_VALUE};
		panel_4.setLayout(gbl_panel_4);
		
		lblLienHe = new JLabel("Thông Tin Liên Hệ ");
		lblLienHe.setFont(UtilityGUI.fontHeader1);
		GridBagConstraints gbc_lblThngTinLin = new GridBagConstraints();
		gbc_lblThngTinLin.fill = GridBagConstraints.VERTICAL;
		gbc_lblThngTinLin.gridx = 5;
		gbc_lblThngTinLin.gridy = 0;
		panel_4.add(lblLienHe, gbc_lblThngTinLin);
		
		panel_5 = new JPanel();
		panel_5.setPreferredSize(new Dimension(500, 900));
		verticalBox.add(panel_5);
		panel_5.setLayout(new BorderLayout(0, 0));
		
		Box horizontalBox_1 = Box.createHorizontalBox();
		panel_5.add(horizontalBox_1, BorderLayout.CENTER);
		
		panel_6 = new JPanel();
		panel_6.setPreferredSize(new Dimension(500, 650));
		horizontalBox_1.add(panel_6);
		GridBagLayout gbl_panel_6 = new GridBagLayout();
		gbl_panel_6.columnWidths = new int[]{0, 100, 0, 0, 0, 0};
		gbl_panel_6.rowHeights = new int[]{44, 37, 39, 42, 39, 40, 37, 38, 30, 0};
		gbl_panel_6.columnWeights = new double[]{1.0, 1.0, 0.0, 0.0, 1.0, Double.MIN_VALUE};
		gbl_panel_6.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		panel_6.setLayout(gbl_panel_6);
		
		lblCongTy = new JLabel("Công Ty :");
		lblCongTy.setFont(UtilityGUI.fontHeader2);
		GridBagConstraints gbc_lblNewLabel_1 = new GridBagConstraints();
		gbc_lblNewLabel_1.anchor = GridBagConstraints.WEST;
		gbc_lblNewLabel_1.insets = new Insets(0, 0, 5, 0);
		gbc_lblNewLabel_1.gridwidth = 7;
		gbc_lblNewLabel_1.gridx = 2;
		gbc_lblNewLabel_1.gridy = 0;
		panel_6.add(lblCongTy, gbc_lblNewLabel_1);
		
		lblLoaiHinh = new JLabel("Loại Hình :");
		lblLoaiHinh.setFont(UtilityGUI.fontHeader2);
		GridBagConstraints gbc_lblLoiHnh = new GridBagConstraints();
		gbc_lblLoiHnh.anchor = GridBagConstraints.WEST;
		gbc_lblLoiHnh.insets = new Insets(0, 0, 5, 0);
		gbc_lblLoiHnh.gridwidth = 7;
		gbc_lblLoiHnh.gridx = 2;
		gbc_lblLoiHnh.gridy = 1;
		panel_6.add(lblLoaiHinh, gbc_lblLoiHnh);
		
		lblLinhVuc = new JLabel("Lĩnh Vực :");
		lblLinhVuc.setFont(UtilityGUI.fontHeader2);
		GridBagConstraints gbc_lblLnhVc = new GridBagConstraints();
		gbc_lblLnhVc.insets = new Insets(0, 0, 5, 0);
		gbc_lblLnhVc.anchor = GridBagConstraints.WEST;
		gbc_lblLnhVc.gridwidth = 7;
		gbc_lblLnhVc.gridx = 2;
		gbc_lblLnhVc.gridy = 2;
		panel_6.add(lblLinhVuc, gbc_lblLnhVc);
		
		lblSangLap = new JLabel("Người Sáng Lập :");
		lblSangLap.setFont(UtilityGUI.fontHeader2);
		GridBagConstraints gbc_lblNgiSngLp = new GridBagConstraints();
		gbc_lblNgiSngLp.insets = new Insets(0, 0, 5, 0);
		gbc_lblNgiSngLp.fill = GridBagConstraints.VERTICAL;
		gbc_lblNgiSngLp.anchor = GridBagConstraints.WEST;
		gbc_lblNgiSngLp.gridwidth = 7;
		gbc_lblNgiSngLp.gridx = 2;
		gbc_lblNgiSngLp.gridy = 3;
		panel_6.add(lblSangLap, gbc_lblNgiSngLp);
		
		lblYaer = new JLabel("Thời Điểm Thành Lập :");
		lblYaer.setFont(UtilityGUI.fontHeader2);
		GridBagConstraints gbc_lblThiimThnh = new GridBagConstraints();
		gbc_lblThiimThnh.anchor = GridBagConstraints.WEST;
		gbc_lblThiimThnh.insets = new Insets(0, 0, 5, 5);
		gbc_lblThiimThnh.gridx = 2;
		gbc_lblThiimThnh.gridy = 4;
		panel_6.add(lblYaer, gbc_lblThiimThnh);
		
		lblAddress1 = new JLabel("Địa Chỉ :");
		lblAddress1.setFont(UtilityGUI.fontHeader2);
		GridBagConstraints gbc_lblaCh = new GridBagConstraints();
		gbc_lblaCh.anchor = GridBagConstraints.WEST;
		gbc_lblaCh.insets = new Insets(0, 0, 5, 5);
		gbc_lblaCh.gridx = 2;
		gbc_lblaCh.gridy = 5;
		panel_6.add(lblAddress1, gbc_lblaCh);
		
		lblPhone1 = new JLabel("Điện Thoại :");
		lblPhone1.setFont(UtilityGUI.fontHeader2);
		GridBagConstraints gbc_lblinThoi = new GridBagConstraints();
		gbc_lblinThoi.anchor = GridBagConstraints.WEST;
		gbc_lblinThoi.insets = new Insets(0, 0, 5, 5);
		gbc_lblinThoi.gridx = 2;
		gbc_lblinThoi.gridy = 6;
		panel_6.add(lblPhone1, gbc_lblinThoi);
		
		lblMail = new JLabel("Mail :");
		lblMail.setFont(UtilityGUI.fontHeader2);
		GridBagConstraints gbc_lblMail = new GridBagConstraints();
		gbc_lblMail.anchor = GridBagConstraints.WEST;
		gbc_lblMail.insets = new Insets(0, 0, 5, 5);
		gbc_lblMail.gridx = 2;
		gbc_lblMail.gridy = 7;
		panel_6.add(lblMail, gbc_lblMail);
		
		lblYahoo = new JLabel("Yahoo :");
		lblYahoo.setFont(UtilityGUI.fontHeader2);
		GridBagConstraints gbc_lblYahoo = new GridBagConstraints();
		gbc_lblYahoo.anchor = GridBagConstraints.WEST;
		gbc_lblYahoo.insets = new Insets(0, 0, 0, 5);
		gbc_lblYahoo.gridx = 2;
		gbc_lblYahoo.gridy = 8;
		panel_6.add(lblYahoo, gbc_lblYahoo);
		
		panel_7 = new JPanel();
		panel_7.setBorder(new LineBorder(new Color(192, 192, 192), 0));
		panel_7.setPreferredSize(new Dimension(400, 1000));
		horizontalBox_1.add(panel_7);
		GridBagLayout gbl_panel_7 = new GridBagLayout();
		gbl_panel_7.columnWidths = new int[]{0, 0};
		gbl_panel_7.rowHeights = new int[]{29, 10, 31, 43, 42, 36, 0, 0, 0, 44, 23, 0};
		gbl_panel_7.columnWeights = new double[]{0.0, Double.MIN_VALUE};
		gbl_panel_7.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		panel_7.setLayout(gbl_panel_7);
		
		lblTTCongTy = new JLabel(list.getCompanyName());
		lblTTCongTy.setFont(UtilityGUI.fontLblForm);
		lblTTCongTy.setForeground(UtilityGUI.colorLblForm);
		GridBagConstraints gbc_lblNewLabel1 = new GridBagConstraints();
		gbc_lblNewLabel1.anchor = GridBagConstraints.WEST;
		gbc_lblNewLabel1.insets = new Insets(0, 0, 5, 0);
		gbc_lblNewLabel1.gridx = 0;
		gbc_lblNewLabel1.gridy = 0;
		panel_7.add(lblTTCongTy, gbc_lblNewLabel1);
		
	    lblCompanyType = new JLabel(list.getCompanyType());
		lblCompanyType.setFont(UtilityGUI.fontLblForm);
		lblCompanyType.setForeground(UtilityGUI.colorLblForm);
		GridBagConstraints gbc_lblloaiHinh = new GridBagConstraints();
		gbc_lblloaiHinh.anchor = GridBagConstraints.WEST;
		gbc_lblloaiHinh.insets = new Insets(0, 0, 5, 0);
		gbc_lblloaiHinh.gridx = 0;
		gbc_lblloaiHinh.gridy = 2;
		panel_7.add(lblCompanyType, gbc_lblloaiHinh);
		
		lblCompanyIn = new JLabel(list.getCompanyIndustry());
		lblCompanyIn.setFont(UtilityGUI.fontLblForm);
		lblCompanyIn.setForeground(UtilityGUI.colorLblForm);
		GridBagConstraints gbc_lblCompanyIn = new GridBagConstraints();
		gbc_lblCompanyIn.insets = new Insets(0, 0, 5, 0);
		gbc_lblCompanyIn.anchor = GridBagConstraints.SOUTHWEST;
		gbc_lblCompanyIn.gridx = 0;
		gbc_lblCompanyIn.gridy = 3;
		panel_7.add(lblCompanyIn, gbc_lblCompanyIn);
		
		lblTTSangLap = new JLabel(list.getCompanyFounder());
		lblTTSangLap.setFont(UtilityGUI.fontLblForm);
		lblTTSangLap.setForeground(UtilityGUI.colorLblForm);
		GridBagConstraints gbc_lblSangLap = new GridBagConstraints();
		gbc_lblSangLap.insets = new Insets(0, 0, 5, 0);
		gbc_lblSangLap.anchor = GridBagConstraints.SOUTHWEST;
		gbc_lblSangLap.gridx = 0;
		gbc_lblSangLap.gridy = 4;
		panel_7.add(lblTTSangLap, gbc_lblSangLap);
		
		lblNamThanhLap = new JLabel(list.getCompanyFounded());
		lblNamThanhLap.setFont(UtilityGUI.fontLblForm);
		lblNamThanhLap.setForeground(UtilityGUI.colorLblForm);
		GridBagConstraints gbc_lblYear = new GridBagConstraints();
		gbc_lblYear.anchor = GridBagConstraints.SOUTHWEST;
		gbc_lblYear.insets = new Insets(0, 0, 5, 0);
		gbc_lblYear.gridx = 0;
		gbc_lblYear.gridy = 5;
		panel_7.add(lblNamThanhLap, gbc_lblYear);
		
		
		lblAddress1 = new JLabel(list.getCompanyHeadquarters());
		lblAddress1.setFont(UtilityGUI.fontLblForm);
		lblAddress1.setForeground(UtilityGUI.colorLblForm);
		GridBagConstraints gbc_lblAddress = new GridBagConstraints();
		gbc_lblAddress.anchor = GridBagConstraints.SOUTHWEST;
		gbc_lblAddress.insets = new Insets(0, 0, 5, 0);
		gbc_lblAddress.gridx = 0;
		gbc_lblAddress.gridy = 9;
		panel_7.add(lblAddress1, gbc_lblAddress);
		
		lblPhone1 = new JLabel(list.getCompanyPhone());
		lblPhone1.setFont(UtilityGUI.fontLblForm);
		lblPhone1.setForeground(UtilityGUI.colorLblForm);
		GridBagConstraints gbc_lblPhone = new GridBagConstraints();
		gbc_lblPhone.anchor = GridBagConstraints.SOUTHWEST;
		gbc_lblPhone.gridx = 0;
		gbc_lblPhone.gridy = 10;
		panel_7.add(lblPhone1, gbc_lblPhone);
		
		panel_3 = new JPanel();
		panel_3.setBorder(new LineBorder(new Color(192, 192, 192), 0));
		panel_3.setPreferredSize(new Dimension(5, 1000));
		horizontalBox.add(panel_3);
		GridBagLayout gbl_panel_3 = new GridBagLayout();
		gbl_panel_3.columnWidths = new int[]{0};
		gbl_panel_3.rowHeights = new int[]{0};
		gbl_panel_3.columnWeights = new double[]{Double.MIN_VALUE};
		gbl_panel_3.rowWeights = new double[]{Double.MIN_VALUE};
		panel_3.setLayout(gbl_panel_3);

	}

}
